using System;
using System.Runtime.InteropServices;
using Microsoft.SharePoint; 
using Microsoft.SharePoint.Utilities;

namespace SPConnections.SandboxingDemo.Features.Web
{
    [Guid("581c4545-595f-450c-b308-6b40a6c27a3c")]
    public class WebEventReceiver : SPFeatureReceiver
    {
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            SPWeb site = (SPWeb)properties.Feature.Parent;
            site.SiteLogoUrl = SPUrlUtility.CombineUrl(
                site.ServerRelativeUrl,
                "Style Library/DemoSite.jpg");
            site.Update();
        }
    }
}
